package com.adnaan.restaurant.controller;

import com.adnaan.restaurant.common.untils.R;
import com.adnaan.restaurant.entity.ResBanner;
import com.adnaan.restaurant.service.IResBannerService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * author: adnaan
 * create: 2023-11-14 17:17
 * Description:
 */

@Tag(name = "店铺轮播接口", description = "获取店铺轮播")
@RestController
@RequestMapping("/restaurant/banner")
public class ResBannerController {

    @Autowired
    private IResBannerService resBannerService;

    @Operation(summary = "轮播列表")
    @GetMapping("/list")
    public R list() {
        List<ResBanner> list = resBannerService.selectResBannerList();
        return R.success(list);
    }
}
